package com.bosssoft.user.permission.center.serve.util;

import com.bosssoft.user.permission.center.serve.dao.entity.SubSystem;
import com.bosssoft.user.permission.center.serve.pojo.dto.SubSystemDTO;

import javax.validation.constraints.NotNull;

/**
 * @className: SubSystemBeanUtil
 * @description: 操作子系统DTO类与子系统实体类之间属性的复制转化
 * @author: lanyukai
 * @date: 2024/6/13 18:10
 * @since 1.0
 **/
public class SubSystemBeanUtil {

    /**
     * 将DTO属性复制给实体类
     * @author lanyukai
     * @date 2024/06/13 18:13
     * @param subSystemDTO 子系统dto
     * @param subSystem 子系统实体类
     */
    public static void copySubSystemDTO2Entity(@NotNull SubSystemDTO subSystemDTO,@NotNull SubSystem subSystem) {
        subSystem.setCode(subSystemDTO.getCode());
        subSystem.setName(subSystemDTO.getName());
        subSystem.setRemark(subSystemDTO.getRemark());
        subSystem.setImageUrl(subSystemDTO.getImageUrl());
        subSystem.setLink(subSystemDTO.getLink());
        subSystem.setUpdatedBy(subSystemDTO.getUpdatedBy());
        subSystem.setUpdatedTime(subSystemDTO.getUpdatedTime());
        subSystem.setModifier(subSystemDTO.getModifier());
    }
}
